package org.example.springtest.config;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Data
@Component
@ConfigurationProperties(prefix = "jwt")
public class JwtProperties {
    private List<String> whitelist;
    private String secret;

    // 必须要有默认构造函数
    public JwtProperties() {}

    // 可选：toString 方法用于调试
    @Override
    public String toString() {
        return "JwtProperties{" +
                "whitelist=" + whitelist +
                ", secret='" + (secret != null ? "***" : "null") + '\'' +
                '}';
    }
}